<?php $this->load->view('admin/common/pageHead');?>
<?php $this->load->view('admin/common/pageHeader');?>


<div class="fLeft">
	<?php $this->load->view('admin/common/left_nav'); ?>
</div>

<div class="fRight" style="margin: 50px 290px 0px 50px">
	<?php //echo $userpass['admin_password'];?>
	<table class="allbdr" valign="top">
		<tr bgcolor="#187ec2">
			<td height="28" colspan="2" class="fotter-color" align="center"><?php if(isset($changeError)){ 
				echo $changeError;
			}?>
			</td>
		</tr>
		<tr bgcolor="#187ec2">
			<td height="28" colspan="2" class="fotter-color" align="center">
				Change Password</td>
		</tr>
		<form action="/updatePass" method="POST" name="password_form"
			onSubmit="return validate();">
			<input type="hidden"
				value=" <?php echo $userpass['admin_password'];?>" id="old_pass1"
				NAME="old_pass1"> <input type="hidden" name="chpwd" value="">
			<tr>
				<td class="text" align="center"><table>
						<tr>
							<td class="tdclass">Enter Old Password:</td>
							<td><INPUT TYPE="password" NAME="oldpass" value=""></td>
						</tr>
						<tr>
							<td class="tdclass">New Password :</td>
							<td><INPUT TYPE="password" NAME="newpass" value=""></td>
						</tr>
						<tr>
							<td class="tdclass">Confirm Password :</td>
							<td><INPUT TYPE="password" NAME="confirmpass" value=""></td>
						</tr>

						<tr>
							<td colspan="2" align="center"><input type="submit" name="sub"
								value=" Modify " />
							</td>
						</tr>
					</table></td>
			</tr>
		<?php //var_dump($userpass); ?>
		</form>
	</table>
	</td>
	</tr>

</div>
<div class="clr">
	<div>


<script language="javascript" type="text/javascript">
function validate(){

if(document.password_form.oldpass.value==''){
	alert("Please Enter Old Password");
	document.password_form.oldpass.focus();
	return false;
}
if(document.password_form.newpass.value==''){
	alert("Please Enter New Password");
	document.password_form.newpass.focus();
	return false;
}
if(document.password_form.confirmpass.value==''){
	alert("Please Confirm your New password ");
	document.password_form.confirmpass.focus();
	return false;
}
if((document.password_form.confirmpass.value!='')&&(document.password_form.confirmpass.value !=document.password_form.newpass.value)){
	alert("Password not Matched With New Password");
	document.password_form.confirmpass.focus();
	return false;
}
return true;
}

</script>


		<?php $this->load->view('admin/common/pageFooter');?>